package lambdasinaction.chap8;

/**
 * Created by ThinkPad on 2017/8/23.
 * 模版,不同的支行可以通过继承OnlineBanking类,对
 *
 */
abstract class OnlineBanking {

    public void processCustomer(int id) {
        Customer c = Database.getCustomerWithId(id);
        makeCustomerHappy(c);
    }

    abstract void makeCustomerHappy(Customer c);

    private static class Customer {}
    private static class Database {
        static Customer getCustomerWithId(int id) {
            return new Customer();
        }
    }
}
